import QtQuick
import QtQuick.Window
import QtQuick3D.Effects 6.2
import Qt5Compat.GraphicalEffects
Rectangle{
    clip: true

    // 属性
    property Item target:background  // 模糊源
    property int radius:64

    // 毛玻璃效果
    FastBlur {
        id: blur
        source: parent.target
        width: source.width;
        height: source.height
        radius: radius
    }

    // 设置模糊组件的位置
//    onXChanged: setBlurPosition();
//    onYChanged: setBlurPosition();
    Component.onCompleted: setBlurPosition();
    function setBlurPosition(){
        blur.x = target.x - x;
        blur.y = target.y - y;
    }
}
